package com.tanhua.dubbo;

import com.tanhua.model.mongo.RecommendUser;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

@SpringBootTest(classes = DubboMongoApplication.class)
@RunWith(SpringRunner.class)
public class Text01 {
    @Autowired
    private MongoTemplate mongoTemplate;
    @Test
    public void Test01() {
        List<RecommendUser> userList = mongoTemplate.findAll(RecommendUser.class);
        for (RecommendUser recommendUser : userList) {
            System.out.println(recommendUser);
        }
    }
}
